ÄúµÄλÖãºÑ°ÃÎÍøÊ×Ò³£¾±à³ÌÀÖÔ°£¾VBScript£¾VBScript


objects constants operators statements functions properties methods







METHOD:  FileSystemObject.GetFolder

object.GetFolder (foldername)

This method is used to get the Folder object for the path that you specify. You can than use the new variable containing the folder object to access it's various methods and properties. The following code demonstrates this by returning the date the folder was created and displaying the details in the browser.

Code:
<%
dim filesys, f
Set filesys = CreateObject("Scripting.FileSystemObject")
Set f = filesys.GetFolder("C:\TestFolder\")
Response.Write ("Your folder was created on " & f.DateCreated)
%>

Output:
"Your folder was created on (date created goes here)."